package com.bc.datasource.vo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class SendObject {
	//private GameDetails gd;
	private String redch;
	private String redcv;
	public String id;
	public String url;
	public String leagal;
	public String time;
	public String teamHome;
	public String teamVisit;
	public String promote;
	public String mainOdd;
	public String result;
	public double ouRate;
	public double yaRate;
	private String pro;
	private String pan0;
	private boolean fanz;
	private String originPan;
	private String firstPan;
	private String firstPanHome;
	private String firstPanGuest;
	
	private String finalPan;
	private String finalPanHome;
	private String finalPanGuest;
	
	
	private String livePan;
	private String livePanHome;
	private String livePanGuest;
	
	private String livePointHome;
	private String livePointGuest;
	

	private boolean drawChange = false;
	private String yaHome1;
	private String yaHome2;
	private String yaVisit1;
	private String yaVisit2;
	private String yaAction;
	private String g;
	
	private String bigHome1;
	private String bigHome2;
	private String bigVisit1;
	private String bigVisit2;
	
	private String yapan;
	private String pankou;

	private String tm;
	
	public String getTm() {
		return tm;
	}
	public void setTm(String tm) {
		this.tm = tm;
	}
	public String getYapan() {
		return yapan;
	}
	public void setYapan(String yapan) {
		this.yapan = yapan;
	}
	public String getPankou() {
		return pankou;
	}
	public void setPankou(String pankou) {
		this.pankou = pankou;
	}
	
	private String yanRight;
	private String oddRight;
	
	
	
	public String getOddRight() {
		return oddRight;
	}
	public void setOddRight(String oddRight) {
		this.oddRight = oddRight;
	}
	public String getYanRight() {
		return yanRight;
	}
	public void setYanRight(String yanRight) {
		this.yanRight = yanRight;
	}
	
	private double integratedScore;
	private double lp;
	private double tp;
	private double op;
	
	public double getLp() {
		return lp;
	}
	public void setLp(double lp) {
		this.lp = lp;
	}
	public double getTp() {
		return tp;
	}
	public void setTp(double tp) {
		this.tp = tp;
	}
	public double getOp() {
		return op;
	}
	public void setOp(double op) {
		this.op = op;
	}
	
	
	
	public String getFirstPan() {
		return firstPan;
	}
	public void setFirstPan(String firstPan) {
		this.firstPan = firstPan;
	}
	public String getFirstPanHome() {
		return firstPanHome;
	}
	public void setFirstPanHome(String firstPanHome) {
		this.firstPanHome = firstPanHome;
	}
	public String getFirstPanGuest() {
		return firstPanGuest;
	}
	public void setFirstPanGuest(String firstPanGuest) {
		this.firstPanGuest = firstPanGuest;
	}
	public String getFinalPan() {
		return finalPan;
	}
	public void setFinalPan(String finalPan) {
		this.finalPan = finalPan;
	}
	public String getFinalPanHome() {
		return finalPanHome;
	}
	public void setFinalPanHome(String finalPanHome) {
		this.finalPanHome = finalPanHome;
	}
	public String getFinalPanGuest() {
		return finalPanGuest;
	}
	public void setFinalPanGuest(String finalPanGuest) {
		this.finalPanGuest = finalPanGuest;
	}
	public String getLivePan() {
		return livePan;
	}
	public void setLivePan(String livePan) {
		this.livePan = livePan;
	}
	public String getLivePanHome() {
		return livePanHome;
	}
	public void setLivePanHome(String livePanHome) {
		this.livePanHome = livePanHome;
	}
	public String getLivePanGuest() {
		return livePanGuest;
	}
	public void setLivePanGuest(String livePanGuest) {
		this.livePanGuest = livePanGuest;
	}
	public String getCost(){
		try {
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date d = sf.parse(this.time);
			Date n = new Date();
			long aa1 = d.getTime();
			long naa = n.getTime();
			long la = naa- aa1;
			if(la<0){
				return "未开始";
			}
			long times = la/1000/60;
			if(times>90+15+5){
				return "已结束";
			}
				
			if(times>=60){
				times = times -15;
			}
			return times+"分钟";
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return "";
		}
	}
	
	public long getCostInt(){
		try {
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date d = sf.parse(this.time);
			Date n = new Date();
			long aa1 = d.getTime();
			long naa = n.getTime();
			long la = naa- aa1;
			if(la<0){
				return 0;
			}
			long times = la/1000/60;
			if(times>90+15+5){
				return 120;
			}
				
			if(times>=60){
				times = times -15;
			}
			return times;
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return 0;
		}
	}
	
	public String getOriginPan() {
		return originPan;
	}
	public void setOriginPan(String originPan) {
		this.originPan = originPan;
	}
	public String getLivePointHome() {
		return livePointHome;
	}
	public void setLivePointHome(String livePointHome) {
		this.livePointHome = livePointHome;
	}
	public String getLivePointGuest() {
		return livePointGuest;
	}
	public void setLivePointGuest(String livePointGuest) {
		this.livePointGuest = livePointGuest;
	}
	public void setIntegratedScore(double integratedScore) {
		this.integratedScore = integratedScore;
	}
	public String getRedch() {
		return redch;
	}
	public void setRedch(String redch) {
		this.redch = redch;
	}
	public String getRedcv() {
		return redcv;
	}
	public void setRedcv(String redcv) {
		this.redcv = redcv;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getLeagal() {
		return leagal;
	}
	public void setLeagal(String leagal) {
		this.leagal = leagal;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getTeamHome() {
		return teamHome;
	}
	public void setTeamHome(String teamHome) {
		this.teamHome = teamHome;
	}
	public String getTeamVisit() {
		return teamVisit;
	}
	public void setTeamVisit(String teamVisit) {
		this.teamVisit = teamVisit;
	}
	public String getPromote() {
		return promote;
	}
	public void setPromote(String promote) {
		this.promote = promote;
	}
	public String getMainOdd() {
		return mainOdd;
	}
	public void setMainOdd(String mainOdd) {
		this.mainOdd = mainOdd;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public double getOuRate() {
		return ouRate;
	}
	public void setOuRate(double ouRate) {
		this.ouRate = ouRate;
	}
	public double getYaRate() {
		return yaRate;
	}
	public void setYaRate(double yaRate) {
		this.yaRate = yaRate;
	}
	public String getPro() {
		return pro;
	}
	public void setPro(String pro) {
		this.pro = pro;
	}
	public String getPan0() {
		return pan0;
	}
	public void setPan0(String pan0) {
		this.pan0 = pan0;
	}
	public boolean isFanz() {
		return fanz;
	}
	public void setFanz(boolean fanz) {
		this.fanz = fanz;
	}
	public boolean isDrawChange() {
		return drawChange;
	}
	public void setDrawChange(boolean drawChange) {
		this.drawChange = drawChange;
	}
	public String getYaHome1() {
		return yaHome1;
	}
	public void setYaHome1(String yaHome1) {
		this.yaHome1 = yaHome1;
	}
	public String getYaHome2() {
		return yaHome2;
	}
	public void setYaHome2(String yaHome2) {
		this.yaHome2 = yaHome2;
	}
	public String getYaVisit1() {
		return yaVisit1;
	}
	public void setYaVisit1(String yaVisit1) {
		this.yaVisit1 = yaVisit1;
	}
	public String getYaVisit2() {
		return yaVisit2;
	}
	public void setYaVisit2(String yaVisit2) {
		this.yaVisit2 = yaVisit2;
	}
	public String getYaAction() {
		return yaAction;
	}
	public void setYaAction(String yaAction) {
		this.yaAction = yaAction;
	}
	public String getG() {
		return g;
	}
	public void setG(String g) {
		this.g = g;
	}
	public String getBigHome1() {
		return bigHome1;
	}
	public void setBigHome1(String bigHome1) {
		this.bigHome1 = bigHome1;
	}
	public String getBigHome2() {
		return bigHome2;
	}
	public void setBigHome2(String bigHome2) {
		this.bigHome2 = bigHome2;
	}
	public String getBigVisit1() {
		return bigVisit1;
	}
	public void setBigVisit1(String bigVisit1) {
		this.bigVisit1 = bigVisit1;
	}
	public String getBigVisit2() {
		return bigVisit2;
	}
	public void setBigVisit2(String bigVisit2) {
		this.bigVisit2 = bigVisit2;
	}
	public double getIntegratedScore() {
		return integratedScore;
	}
	/*public GameDetails getGd() {
		return gd;
	}
	public void setGd(GameDetails gd) {
		this.gd = gd;
	}*/
	@Override
	public String toString() {
		return "SendObject [联赛:" + leagal + ", 比赛时间:"
				+ time + ", 主队:" + teamHome + ", 客队:" + teamVisit
				//+ ", 即时比分=【" + livePointHome + "：" + livePointGuest + "】"
				//+ ", 初盘=" + firstPan + ", 初盘主赔=" + firstPanHome + ", 初盘客赔=" + firstPanGuest
				+ ", 盘口:" + finalPan + ", 主赔:" + finalPanHome + ", 客赔:" + finalPanGuest
				//+ ", 即时滚球盘口=" + livePan + ", 即时滚球主赔=" + livePanHome + ", 即时滚球客赔=" + livePanGuest
				+"]";
	}
	
	
	
	

}
